<?php
	ob_start();
	include_once "../classes/tinchinh_bs.php";
	include_once "../classes/thuvienham.php";
	if(!IsAdmin())
		header("Location: index.php");
	$MaBaiViet = $_GET['mabaiviet'];
	$tinchinh = new tinchinh_bs();
	$tinchinh->SetMaBaiViet($MaBaiViet);
	if($tinchinh->TonTai() == 1)
	{
		$tinchinh->Xoa();
	}
	else
	{
		$tinchinh->Them();
	}
	
	header("Location: " . $_SERVER['HTTP_REFERER']);
	ob_flush();
?>